<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>9_ng-options</title>
    <script src="../lib/angularjs.js"></script>
</head>

<body ng-app="myApp" ng-controller="myCtrl">
    <select name="youLikeAnime" ng-options="a.value as a.name for a in anime" ng-model="selectedAnime"></select>
    <div>
        {{selectedAnime}}
    </div>
</body>

<script>
    const myApp = angular.module("myApp", [])
    myApp.controller("myCtrl", ["$scope", function ($scope) {
        $scope.anime = [{
            name: "海贼王",
            value: "haizeiwang"
        }, {
            name: "火影忍者",
            value: "huoyingrenzhe"
        }, {
            name: "妖精的尾巴",
            value: "yaojingdeweiba"
        }]
    }])
</script>

</html>